{template 'yp', 'member_header'}
<script type="text/javascript">
<!--
	var charset = '{CHARSET}';
	var uploadurl = '{php echo pc_base::load_config('system','upload_url')}';
//-->
</script>
<link href="{CSS_PATH}dialog.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{JS_PATH}dialog.js"></script>
<script language="javascript" type="text/javascript" src="{JS_PATH}content_addtop.js"></script>
<div id="memberArea">
	{template 'yp', 'member_left'}
	<div class="col-auto">
		<div class="col-1 ">
			<h5 class="title">信息修改</h5>
			<div class="content">
				
			<form method="post" action="?m=yp&c=business&a=content&action=edit&modelid={$modelid}" id="myform" name="myform">
				<table width="100%" cellspacing="0" class="table_form">
					{loop $forminfos $k $v}
					<tr>
						<th width="100">{if $v['star']} <font color="red">*</font>{/if} {$v['name']}：</th> 
						<td>{$v['form']}{if $v['tips']}{$v['tips']}{/if}</td>
					</tr>
					{/loop}
				</table>
                <div id="addition_param" style="display:none;">
                    <h5>附加参数</h5>
                    <table width="100%" cellspacing="0" class="table_form">
                        <tbody id="addition_content">
                        </tbody>
                    </table>
                </div>
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="100"></th>
						<td>
						<input name="forward" type="hidden" value="{HTTP_REFERER}">
						<input name="id" type="hidden" value="{$id}">
						<input name="dosubmit" type="submit" id="dosubmit" value="　　{L('submit')}　　" class="button"></td>
					</tr>
				</table>
			</form>

			</div>
			<span class="o1"></span><span class="o2"></span><span class="o3"></span><span class="o4"></span>
		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript"> 
<!--
//只能放到最下面
$(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, 	function(){$(obj).focus();
	boxid = $(obj).attr('id');
	if($('#'+boxid).attr('boxid')!=undefined) {
		check_content(boxid);
	}
	})}});
	{$formValidator}
})

function get_additional(obj) {
	var modelid = {$modelid};
	var catid = obj.value;
	$.get('{APP_PATH}index.php', {m:'yp', c:'business', a:'content', action:'get_addition', modelid:modelid, catid:catid, id:{$id},time:Math.random()}, function (data) {
		if (data) {
			var obj = eval( "(" + data + ")" );
			var string = '';
			for (var one in obj) {
				string += '<tr><th width="100"> '+obj[one].name+'：</th>';
				string += '<td>'+obj[one].form+'</td>';
			}
			$('#addition_param').show();
			$('#addition_content').html(string);
		} else {
			$('#addition_param').hide();
			$('#addition_content').html();
		}
	})
}

get_additional(obj);
//-->
</script>
{template 'member', 'footer'}